# $Id: PKGBUILD 82781 2013-01-24 12:30:51Z seblu $
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Tilman Blumenbach <tilman (at) ax86 (dot) net>

pkgname=netperf
pkgver=2.6.0
pkgrel=2
pkgdesc='Benchmarking tool for many different types of networking'
url='http://www.netperf.org/'
license=('custom')
arch=('i686' 'x86_64')
depends=('glibc' 'libsmbios' 'lksctp-tools')
install=$pkgname.install
source=(
  "ftp://ftp.netperf.org/netperf/$pkgname-$pkgver.tar.bz2"
  "$pkgname.service")
md5sums=('9654ffdfd4c4f2c93ce3733cd9ed9236'
         '7bce5056b2a24d76fcc0c20e4b527416')

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr \
    --enable-demo \
    --enable-unixdomain \
    --enable-dccp \
    --enable-sctp
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  # license
  install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
  # systemd
  install -D -m 644 ../$pkgname.service \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}

# vim:set ts=2 sw=2 et:
